Effect.Notify = Class.create(Effect.Base, {
	initialize: function(element) {
		this.element = $(element);
		if (!this.element) throw(Effect._elementDoesNotExistError);
		
		queue = {
						position:'end',
						scope:(this.element.id || 'global'),
						limit: 2
					};
		
		var args = arguments[1];
		
		this.options = {
			notify : {}
			};
		var notify = args ? (args.notify ? $H(args.notify) : $H({top: 15, left : 15})) : $H({top: 15, left : 15});
		this.options.notify.position = notify.keys()[0] + '-' + notify.keys()[1];

		var keys = notify.keys();
		var left = keys.indexOf('left');
		left = (left != -1) ? notify.values()[left] + 'px': null;
		var right = keys.indexOf('right');
		right = (right != -1) ? notify.values()[right] + 'px' : null;
		var top = keys.indexOf('top');
		top = (top != -1) ? notify.values()[top] : null;
		var bottom = keys.indexOf('bottom');
		bottom = (bottom != -1) ? notify.values()[bottom] : null;
		this.pos = {
			name : top ? 'top' : 'bottom',
			value : top ? top : bottom
		}
	
		this.element.setStyle({
				position	:	'fixed',
				left : left,
				right : right,
				top: top ? top + 'px' : null,
				bottom : bottom ? bottom + 'px' : null,
				zIndex : 99
				});

		this.options.appear = Object.extend({
			queue: queue
		}, (args) ? args.appear : null || { });

	
		this.options.fade = Object.extend({
			queue: queue,
			delay: 3
		}, (args) ? args.fade : null || { });

		new Effect.Appear(this.element, this.options.appear);
		new Effect.Fade(this.element, this.options.fade);
	}
});

/*for use:
 new Effect.Notify(element);
 new Effect.Notify(element, {notify : {bottom : 50, right : 100}, appear: {}, fade : {}});
*/